Optimal. Leaf size=597 \[ \frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (c \left (d+\frac {e}{x^2}\right )^p\right )}{\sqrt {f} \sqrt {g}}+\frac {2 p \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (\frac {2 \sqrt {f}}{\sqrt {f}-i \sqrt {g} x}\right )}{\sqrt {f} \sqrt {g}}-\frac {p \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (-\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}-\sqrt {-d} x\right )}{\left (i \sqrt {-d} \sqrt {f}-\sqrt {e} \sqrt {g}\right ) \left (\sqrt {f}-i \sqrt {g} x\right )}\right )}{\sqrt {f} \sqrt {g}}-\frac {p \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}+\sqrt {-d} x\right )}{\left (i \sqrt {-d} \sqrt {f}+\sqrt {e} \sqrt {g}\right ) \left (\sqrt {f}-i \sqrt {g} x\right )}\right )}{\sqrt {f} \sqrt {g}}+\frac {i p \text {Li}_2\left (-\frac {i \sqrt {g} x}{\sqrt {f}}\right )}{\sqrt {f} \sqrt {g}}-\frac {i p \text {Li}_2\left (\frac {i \sqrt {g} x}{\sqrt {f}}\right )}{\sqrt {f} \sqrt {g}}-\frac {i p \text {Li}_2\left (1-\frac {2 \sqrt {f}}{\sqrt {f}-i \sqrt {g} x}\right )}{\sqrt {f} \sqrt {g}}+\frac {i p \text {Li}_2\left (1+\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}-\sqrt {-d} x\right )}{\left (i \sqrt {-d} \sqrt {f}-\sqrt {e} \sqrt {g}\right ) \left (\sqrt {f}-i \sqrt {g} x\right )}\right )}{2 \sqrt {f} \sqrt {g}}+\frac {i p \text {Li}_2\left (1-\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}+\sqrt {-d} x\right )}{\left (i \sqrt {-d} \sqrt {f}+\sqrt {e} \sqrt {g}\right ) \left (\sqrt {f}-i \sqrt {g} x\right )}\right )}{2 \sqrt {f} \sqrt {g}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.57, antiderivative size = 597, normalized size of antiderivative = 1.00, number of steps
used = 18, number of rules used = 12, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.546, Rules used = {211, 2520,
12, 266, 6820, 5048, 4940, 2438, 4966, 2449, 2352, 2497} \begin {gather*} \frac {i p \text {PolyLog}\left (2,1+\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}-\sqrt {-d} x\right )}{\left (\sqrt {f}-i \sqrt {g} x\right ) \left (-\sqrt {e} \sqrt {g}+i \sqrt {-d} \sqrt {f}\right )}\right )}{2 \sqrt {f} \sqrt {g}}+\frac {i p \text {PolyLog}\left (2,1-\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {-d} x+\sqrt {e}\right )}{\left (\sqrt {f}-i \sqrt {g} x\right ) \left (\sqrt {e} \sqrt {g}+i \sqrt {-d} \sqrt {f}\right )}\right )}{2 \sqrt {f} \sqrt {g}}+\frac {i p \text {PolyLog}\left (2,-\frac {i \sqrt {g} x}{\sqrt {f}}\right )}{\sqrt {f} \sqrt {g}}-\frac {i p \text {PolyLog}\left (2,\frac {i \sqrt {g} x}{\sqrt {f}}\right )}{\sqrt {f} \sqrt {g}}-\frac {i p \text {PolyLog}\left (2,1-\frac {2 \sqrt {f}}{\sqrt {f}-i \sqrt {g} x}\right )}{\sqrt {f} \sqrt {g}}+\frac {\text {ArcTan}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (c \left (d+\frac {e}{x^2}\right )^p\right )}{\sqrt {f} \sqrt {g}}-\frac {p \text {ArcTan}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (-\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}-\sqrt {-d} x\right )}{\left (\sqrt {f}-i \sqrt {g} x\right ) \left (-\sqrt {e} \sqrt {g}+i \sqrt {-d} \sqrt {f}\right )}\right )}{\sqrt {f} \sqrt {g}}-\frac {p \text {ArcTan}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {-d} x+\sqrt {e}\right )}{\left (\sqrt {f}-i \sqrt {g} x\right ) \left (\sqrt {e} \sqrt {g}+i \sqrt {-d} \sqrt {f}\right )}\right )}{\sqrt {f} \sqrt {g}}+\frac {2 p \text {ArcTan}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (\frac {2 \sqrt {f}}{\sqrt {f}-i \sqrt {g} x}\right )}{\sqrt {f} \sqrt {g}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 211
Rule 266
Rule 2352
Rule 2438
Rule 2449
Rule 2497
Rule 2520
Rule 4940
Rule 4966
Rule 5048
Rule 6820
Rubi steps
\begin {align*} \int \frac {\log \left (c \left (d+\frac {e}{x^2}\right )^p\right )}{f+g x^2} \, dx &=\frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (c \left (d+\frac {e}{x^2}\right )^p\right )}{\sqrt {f} \sqrt {g}}+(2 e p) \int \frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{\sqrt {f} \sqrt {g} \left (d+\frac {e}{x^2}\right ) x^3} \, dx\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (c \left (d+\frac {e}{x^2}\right )^p\right )}{\sqrt {f} \sqrt {g}}+\frac {(2 e p) \int \frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{\left (d+\frac {e}{x^2}\right ) x^3} \, dx}{\sqrt {f} \sqrt {g}}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (c \left (d+\frac {e}{x^2}\right )^p\right )}{\sqrt {f} \sqrt {g}}+\frac {(2 e p) \int \frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{x \left (e+d x^2\right )} \, dx}{\sqrt {f} \sqrt {g}}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (c \left (d+\frac {e}{x^2}\right )^p\right )}{\sqrt {f} \sqrt {g}}+\frac {(2 e p) \int \left (\frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{e x}-\frac {d x \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{e \left (e+d x^2\right )}\right ) \, dx}{\sqrt {f} \sqrt {g}}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (c \left (d+\frac {e}{x^2}\right )^p\right )}{\sqrt {f} \sqrt {g}}+\frac {(2 p) \int \frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{x} \, dx}{\sqrt {f} \sqrt {g}}-\frac {(2 d p) \int \frac {x \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{e+d x^2} \, dx}{\sqrt {f} \sqrt {g}}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (c \left (d+\frac {e}{x^2}\right )^p\right )}{\sqrt {f} \sqrt {g}}+\frac {(i p) \int \frac {\log \left (1-\frac {i \sqrt {g} x}{\sqrt {f}}\right )}{x} \, dx}{\sqrt {f} \sqrt {g}}-\frac {(i p) \int \frac {\log \left (1+\frac {i \sqrt {g} x}{\sqrt {f}}\right )}{x} \, dx}{\sqrt {f} \sqrt {g}}-\frac {(2 d p) \int \left (-\frac {\sqrt {-d} \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{2 d \left (\sqrt {e}-\sqrt {-d} x\right )}+\frac {\sqrt {-d} \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{2 d \left (\sqrt {e}+\sqrt {-d} x\right )}\right ) \, dx}{\sqrt {f} \sqrt {g}}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (c \left (d+\frac {e}{x^2}\right )^p\right )}{\sqrt {f} \sqrt {g}}+\frac {i p \text {Li}_2\left (-\frac {i \sqrt {g} x}{\sqrt {f}}\right )}{\sqrt {f} \sqrt {g}}-\frac {i p \text {Li}_2\left (\frac {i \sqrt {g} x}{\sqrt {f}}\right )}{\sqrt {f} \sqrt {g}}+\frac {\left (\sqrt {-d} p\right ) \int \frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{\sqrt {e}-\sqrt {-d} x} \, dx}{\sqrt {f} \sqrt {g}}-\frac {\left (\sqrt {-d} p\right ) \int \frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{\sqrt {e}+\sqrt {-d} x} \, dx}{\sqrt {f} \sqrt {g}}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (c \left (d+\frac {e}{x^2}\right )^p\right )}{\sqrt {f} \sqrt {g}}+\frac {2 p \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (\frac {2 \sqrt {f}}{\sqrt {f}-i \sqrt {g} x}\right )}{\sqrt {f} \sqrt {g}}-\frac {p \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (-\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}-\sqrt {-d} x\right )}{\left (i \sqrt {-d} \sqrt {f}-\sqrt {e} \sqrt {g}\right ) \left (\sqrt {f}-i \sqrt {g} x\right )}\right )}{\sqrt {f} \sqrt {g}}-\frac {p \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}+\sqrt {-d} x\right )}{\left (i \sqrt {-d} \sqrt {f}+\sqrt {e} \sqrt {g}\right ) \left (\sqrt {f}-i \sqrt {g} x\right )}\right )}{\sqrt {f} \sqrt {g}}+\frac {i p \text {Li}_2\left (-\frac {i \sqrt {g} x}{\sqrt {f}}\right )}{\sqrt {f} \sqrt {g}}-\frac {i p \text {Li}_2\left (\frac {i \sqrt {g} x}{\sqrt {f}}\right )}{\sqrt {f} \sqrt {g}}-2 \frac {p \int \frac {\log \left (\frac {2}{1-\frac {i \sqrt {g} x}{\sqrt {f}}}\right )}{1+\frac {g x^2}{f}} \, dx}{f}+\frac {p \int \frac {\log \left (\frac {2 \sqrt {g} \left (\sqrt {e}-\sqrt {-d} x\right )}{\sqrt {f} \left (-i \sqrt {-d}+\frac {\sqrt {e} \sqrt {g}}{\sqrt {f}}\right ) \left (1-\frac {i \sqrt {g} x}{\sqrt {f}}\right )}\right )}{1+\frac {g x^2}{f}} \, dx}{f}+\frac {p \int \frac {\log \left (\frac {2 \sqrt {g} \left (\sqrt {e}+\sqrt {-d} x\right )}{\sqrt {f} \left (i \sqrt {-d}+\frac {\sqrt {e} \sqrt {g}}{\sqrt {f}}\right ) \left (1-\frac {i \sqrt {g} x}{\sqrt {f}}\right )}\right )}{1+\frac {g x^2}{f}} \, dx}{f}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (c \left (d+\frac {e}{x^2}\right )^p\right )}{\sqrt {f} \sqrt {g}}+\frac {2 p \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (\frac {2 \sqrt {f}}{\sqrt {f}-i \sqrt {g} x}\right )}{\sqrt {f} \sqrt {g}}-\frac {p \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (-\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}-\sqrt {-d} x\right )}{\left (i \sqrt {-d} \sqrt {f}-\sqrt {e} \sqrt {g}\right ) \left (\sqrt {f}-i \sqrt {g} x\right )}\right )}{\sqrt {f} \sqrt {g}}-\frac {p \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}+\sqrt {-d} x\right )}{\left (i \sqrt {-d} \sqrt {f}+\sqrt {e} \sqrt {g}\right ) \left (\sqrt {f}-i \sqrt {g} x\right )}\right )}{\sqrt {f} \sqrt {g}}+\frac {i p \text {Li}_2\left (-\frac {i \sqrt {g} x}{\sqrt {f}}\right )}{\sqrt {f} \sqrt {g}}-\frac {i p \text {Li}_2\left (\frac {i \sqrt {g} x}{\sqrt {f}}\right )}{\sqrt {f} \sqrt {g}}+\frac {i p \text {Li}_2\left (1+\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}-\sqrt {-d} x\right )}{\left (i \sqrt {-d} \sqrt {f}-\sqrt {e} \sqrt {g}\right ) \left (\sqrt {f}-i \sqrt {g} x\right )}\right )}{2 \sqrt {f} \sqrt {g}}+\frac {i p \text {Li}_2\left (1-\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}+\sqrt {-d} x\right )}{\left (i \sqrt {-d} \sqrt {f}+\sqrt {e} \sqrt {g}\right ) \left (\sqrt {f}-i \sqrt {g} x\right )}\right )}{2 \sqrt {f} \sqrt {g}}-2 \frac {(i p) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-\frac {i \sqrt {g} x}{\sqrt {f}}}\right )}{\sqrt {f} \sqrt {g}}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (c \left (d+\frac {e}{x^2}\right )^p\right )}{\sqrt {f} \sqrt {g}}+\frac {2 p \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (\frac {2 \sqrt {f}}{\sqrt {f}-i \sqrt {g} x}\right )}{\sqrt {f} \sqrt {g}}-\frac {p \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (-\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}-\sqrt {-d} x\right )}{\left (i \sqrt {-d} \sqrt {f}-\sqrt {e} \sqrt {g}\right ) \left (\sqrt {f}-i \sqrt {g} x\right )}\right )}{\sqrt {f} \sqrt {g}}-\frac {p \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \log \left (\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}+\sqrt {-d} x\right )}{\left (i \sqrt {-d} \sqrt {f}+\sqrt {e} \sqrt {g}\right ) \left (\sqrt {f}-i \sqrt {g} x\right )}\right )}{\sqrt {f} \sqrt {g}}+\frac {i p \text {Li}_2\left (-\frac {i \sqrt {g} x}{\sqrt {f}}\right )}{\sqrt {f} \sqrt {g}}-\frac {i p \text {Li}_2\left (\frac {i \sqrt {g} x}{\sqrt {f}}\right )}{\sqrt {f} \sqrt {g}}-\frac {i p \text {Li}_2\left (1-\frac {2 \sqrt {f}}{\sqrt {f}-i \sqrt {g} x}\right )}{\sqrt {f} \sqrt {g}}+\frac {i p \text {Li}_2\left (1+\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}-\sqrt {-d} x\right )}{\left (i \sqrt {-d} \sqrt {f}-\sqrt {e} \sqrt {g}\right ) \left (\sqrt {f}-i \sqrt {g} x\right )}\right )}{2 \sqrt {f} \sqrt {g}}+\frac {i p \text {Li}_2\left (1-\frac {2 \sqrt {f} \sqrt {g} \left (\sqrt {e}+\sqrt {-d} x\right )}{\left (i \sqrt {-d} \sqrt {f}+\sqrt {e} \sqrt {g}\right ) \left (\sqrt {f}-i \sqrt {g} x\right )}\right )}{2 \sqrt {f} \sqrt {g}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.27, size = 706, normalized size = 1.18 \begin {gather*} \frac {\log \left (c \left (d+\frac {e}{x^2}\right )^p\right ) \log \left (\sqrt {-f}-\sqrt {g} x\right )+2 p \log \left (\frac {\sqrt {g} x}{\sqrt {-f}}\right ) \log \left (\sqrt {-f}-\sqrt {g} x\right )-p \log \left (\frac {\sqrt {g} \left (-\sqrt {e}+\sqrt {-d} x\right )}{\sqrt {-d} \sqrt {-f}-\sqrt {e} \sqrt {g}}\right ) \log \left (\sqrt {-f}-\sqrt {g} x\right )-p \log \left (\frac {\sqrt {g} \left (\sqrt {e}+\sqrt {-d} x\right )}{\sqrt {-d} \sqrt {-f}+\sqrt {e} \sqrt {g}}\right ) \log \left (\sqrt {-f}-\sqrt {g} x\right )-\log \left (c \left (d+\frac {e}{x^2}\right )^p\right ) \log \left (\sqrt {-f}+\sqrt {g} x\right )-2 p \log \left (\frac {f \sqrt {g} x}{(-f)^{3/2}}\right ) \log \left (\sqrt {-f}+\sqrt {g} x\right )+p \log \left (\frac {\sqrt {g} \left (\sqrt {e}-\sqrt {-d} x\right )}{\sqrt {-d} \sqrt {-f}+\sqrt {e} \sqrt {g}}\right ) \log \left (\sqrt {-f}+\sqrt {g} x\right )+p \log \left (-\frac {\sqrt {g} \left (\sqrt {e}+\sqrt {-d} x\right )}{\sqrt {-d} \sqrt {-f}-\sqrt {e} \sqrt {g}}\right ) \log \left (\sqrt {-f}+\sqrt {g} x\right )-p \text {Li}_2\left (\frac {\sqrt {-d} \left (\sqrt {-f}-\sqrt {g} x\right )}{\sqrt {-d} \sqrt {-f}-\sqrt {e} \sqrt {g}}\right )-p \text {Li}_2\left (\frac {\sqrt {-d} \left (\sqrt {-f}-\sqrt {g} x\right )}{\sqrt {-d} \sqrt {-f}+\sqrt {e} \sqrt {g}}\right )+p \text {Li}_2\left (\frac {\sqrt {-d} \left (\sqrt {-f}+\sqrt {g} x\right )}{\sqrt {-d} \sqrt {-f}-\sqrt {e} \sqrt {g}}\right )+p \text {Li}_2\left (\frac {\sqrt {-d} \left (\sqrt {-f}+\sqrt {g} x\right )}{\sqrt {-d} \sqrt {-f}+\sqrt {e} \sqrt {g}}\right )-2 p \text {Li}_2\left (1+\frac {\sqrt {g} x}{\sqrt {-f}}\right )+2 p \text {Li}_2\left (1+\frac {f \sqrt {g} x}{(-f)^{3/2}}\right )}{2 \sqrt {-f} \sqrt {g}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.24, size = 0, normalized size = 0.00 \[\int \frac {\ln \left (c \left (d +\frac {e}{x^{2}}\right )^{p}\right )}{g \,x^{2}+f}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\ln \left (c\,{\left (d+\frac {e}{x^2}\right )}^p\right )}{g\,x^2+f} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________